<?php
#                                                                                 
# author: Cody Sorgenfrey                                       
# (c)2013 South Hill Calvary Chapel                                               
#                                                                                 
include_once("../mysql/database_info.php");
include_once("../mysql/common.php");
connect_select_test("events");
$query = "INSERT INTO `Registration_".$_GET['tableID']."` VALUES(";
$result = mysql_query("SELECT * FROM `Registration_".$_GET['tableID']."` LIMIT 0,1");
for ($x=0;$x<mysql_num_fields($result);$x++){
	if ($x != 0){
		$query .= ", ";
	}
	$query .= "''";
}
$query .= ")";
if (mysql_query($query)){
	echo mysql_result(mysql_query("SELECT `id` FROM `Registration_".$_GET['tableID']."` ORDER BY `id` DESC LIMIT 0,1"), 0, 0);
} else {
	echo "Error ".$query;
}
?>